package com.jyh.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jyh.blog.dto.*;
import com.jyh.blog.entity.Comment;
import com.jyh.blog.vo.CommentVO;
import com.jyh.blog.vo.ConditionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (Comment)表数据库访问层
 *
 * @author jyh
 * @since 2023-02-19 15:58:48
 */
public interface CommentDao extends BaseMapper<Comment> {


    List<CommentDTO> pageList(@Param("current") Long limitCurrent, @Param("size") Long size, @Param("comment") CommentVO commentVO);

    List<ReplyDTO> replyList(@Param("commentIdList") List<String> commentIdList);

    List<ReplyCountDTO> replyCountListByCommentId(@Param("commentIdList")List<String> commentIdList);

    List<CommentCountDTO> replyCountListByTopicId(@Param("topicIdList") List<String> topicIdList);

    List<ReplyDTO> replyByCommentId(@Param("current") Long limitCurrent, @Param("size") Long size,@Param("commentId") String commentId);

    int countCommentBack(@Param("condition") ConditionVO conditionVO);

    List<CommentBackDTO> commentBackList(@Param("current") Long limitCurrent,@Param("size")  Long size,@Param("condition")  ConditionVO conditionVO);
}

